<!doctype html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>服装企业人事管理系统</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" th:href="@{/css/font.css}">
    <link rel="stylesheet" th:href="@{/css/xadmin.css}">
    <link rel="stylesheet" type="text/css" th:href="@{css/jedate.css}">
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script th:src="@{/js/jedate.js}"></script>
    <link rel="stylesheet" th:href="@{/css/jedate.css}">
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body class="index">
<!-- 顶部开始 -->
<div th:replace="employee/commons/bar::topbar"></div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div th:replace="employee/commons/bar::sidebar"></div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content" style="overflow: auto;">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <div class="layui-tab-item layui-show">
            <button id="btn" class="layui-btn layui-btn-lg layui-btn-normal" style="margin:100px;width: 300px; height: 200px; font-size: 45px; line-height: 200px;">[[${session.checkTime}]]</button>
        </div>
        <blockquote class="layui-elem-quote">
            考勤记录查询
        </blockquote>
        <form th:action="@{/selCheck}" method="post">
            <input type="text" style="cursor: default;background-color: white;"
                   class="form-control" name="startTime" id="start_time" placeholder="考勤起始日期" />
            <input type="text" style="cursor: default;background-color: white;"
                   class="form-control" name="endTime" id="end_time" placeholder="考勤结束日期" />
            <div class="layui-inline layui-show-xs-block">
                <button class="layui-btn" lay-filter="sreach" lay-submit=""><i class="layui-icon">&#xe615;</i></button>
            </div>
        </form>
        <table class="layui-table layui-form">
            <thead>
            <th>上午打卡时间</th>
            <th>状态</th>
            <th>下午打卡时间</th>
            <th>状态</th>
            <th>打卡日期</th>
            </thead>
            <tbody>
            <tr th:each="check:${checks}">
                <td th:text="${check.morningCheck}"></td>
                <td th:text="${check.mState}"></td>
                <td th:text="${check.eveningCheck}"></td>
                <td th:text="${check.eState}"></td>
                <td th:text="${check.nowDate}"></td>
            </tr>
            </tbody>
        </table>
    </div>

</div>k
<div class="page-content-bg"></div>
<style id="theme_style"></style>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
</body>
<script>
    $(document).ready(function () {
        $("#btn").click(function () {
            $.post(
                "/empCheck",
                {
                },
                function(data,status){
                    alert(data);
                    window.location.href="/checking";
                }
            );
        });
    });

</script>
<script>
    jeDate("#start_time", {
        format:"YYYY-MM-DD" });
    jeDate("#end_time", {
        format:"YYYY-MM-DD" });
</script>
</html>